import request from '@/utils/request'

export const getQuerstionsList = (params) => request({
    method: 'get',
    url: 'questions/choice',
    params
})
//获取学科列表
export const getXuekeListApi = (params) => request({
    url: '/subjects',
    params,
})

//上下架
export const EditQuerstionsListApi = (data) => request({
    url: `questions/choice/${data.id}/${data.publishState}`,
    data,
    method: 'post'
})
//获取标签列表
export const getTagsList = (params) => request({
    method: 'get',
    url: 'tags',
    params
})
//审批
export const EditzhuangtaiApi = (data) => request({
    url: 'questions/check/' + data.id,
    data,
    method: 'post'
})
//目录列表
export const getDirectorys = params => request({
    url: 'directorys',
    params
})
//删除

export const delQuestionsApi = id => request({
    url: 'questions/' + id,
    method: 'DELETE'
})
// 获取用户列表
export const getBackUserListApi = params => {
    return request({
        url: 'users/?',
        params
    })
}
//获取单个题目详情
export const getQuestionsInfoApi = id => request({
    url: 'questions/' + id,
})